3.307 \(\int \frac{2+x+3 x^2-5 x^3+4 x^4}{3+2 x+5 x^2} \, dx\)

Optimal. Leaf size=56 \[ \frac{4 x^3}{15}-\frac{33 x^2}{50}+\frac{229}{625} \log \left (5 x^2+2 x+3\right )+\frac{81 x}{125}-\frac{423 \tan ^{-1}\left (\frac{5 x+1}{\sqrt{14}}\right )}{625 \sqrt{14}} \]

[Out]

(81*x)/125 - (33*x^2)/50 + (4*x^3)/15 - (423*ArcTan[(1 + 5*x)/Sqrt[14]])/(625*Sqrt[14]) + (229*Log[3 + 2*x + 5
*x^2])/625

________________________________________________________________________________________

Rubi [A]  time = 0.0486828, antiderivative size = 56, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.161, Rules used = {1657, 634, 618, 204, 628} \[ \frac{4 x^3}{15}-\frac{33 x^2}{50}+\frac{229}{625} \log \left (5 x^2+2 x+3\right )+\frac{81 x}{125}-\frac{423 \tan ^{-1}\left (\frac{5 x+1}{\sqrt{14}}\right )}{625 \sqrt{14}} \]

Antiderivative was successfully verified.

[In]

Int[(2 + x + 3*x^2 - 5*x^3 + 4*x^4)/(3 + 2*x + 5*x^2),x]

[Out]

(81*x)/125 - (33*x^2)/50 + (4*x^3)/15 - (423*ArcTan[(1 + 5*x)/Sqrt[14]])/(625*Sqrt[14]) + (229*Log[3 + 2*x + 5
*x^2])/625

Rule 1657

Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x + c*x^2)^p, x
], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{2+x+3 x^2-5 x^3+4 x^4}{3+2 x+5 x^2} \, dx &=\int \left (\frac{81}{125}-\frac{33 x}{25}+\frac{4 x^2}{5}+\frac{7+458 x}{125 \left (3+2 x+5 x^2\right )}\right ) \, dx\\ &=\frac{81 x}{125}-\frac{33 x^2}{50}+\frac{4 x^3}{15}+\frac{1}{125} \int \frac{7+458 x}{3+2 x+5 x^2} \, dx\\ &=\frac{81 x}{125}-\frac{33 x^2}{50}+\frac{4 x^3}{15}+\frac{229}{625} \int \frac{2+10 x}{3+2 x+5 x^2} \, dx-\frac{423}{625} \int \frac{1}{3+2 x+5 x^2} \, dx\\ &=\frac{81 x}{125}-\frac{33 x^2}{50}+\frac{4 x^3}{15}+\frac{229}{625} \log \left (3+2 x+5 x^2\right )+\frac{846}{625} \operatorname{Subst}\left (\int \frac{1}{-56-x^2} \, dx,x,2+10 x\right )\\ &=\frac{81 x}{125}-\frac{33 x^2}{50}+\frac{4 x^3}{15}-\frac{423 \tan ^{-1}\left (\frac{1+5 x}{\sqrt{14}}\right )}{625 \sqrt{14}}+\frac{229}{625} \log \left (3+2 x+5 x^2\right )\\ \end{align*}

Mathematica [A]  time = 0.0180964, size = 50, normalized size = 0.89 \[ \frac{35 x \left (200 x^2-495 x+486\right )+9618 \log \left (5 x^2+2 x+3\right )-1269 \sqrt{14} \tan ^{-1}\left (\frac{5 x+1}{\sqrt{14}}\right )}{26250} \]

Antiderivative was successfully verified.

[In]

Integrate[(2 + x + 3*x^2 - 5*x^3 + 4*x^4)/(3 + 2*x + 5*x^2),x]

[Out]

(35*x*(486 - 495*x + 200*x^2) - 1269*Sqrt[14]*ArcTan[(1 + 5*x)/Sqrt[14]] + 9618*Log[3 + 2*x + 5*x^2])/26250

________________________________________________________________________________________

Maple [A]  time = 0.048, size = 44, normalized size = 0.8 \begin{align*}{\frac{4\,{x}^{3}}{15}}-{\frac{33\,{x}^{2}}{50}}+{\frac{81\,x}{125}}+{\frac{229\,\ln \left ( 5\,{x}^{2}+2\,x+3 \right ) }{625}}-{\frac{423\,\sqrt{14}}{8750}\arctan \left ({\frac{ \left ( 10\,x+2 \right ) \sqrt{14}}{28}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((4*x^4-5*x^3+3*x^2+x+2)/(5*x^2+2*x+3),x)

[Out]

4/15*x^3-33/50*x^2+81/125*x+229/625*ln(5*x^2+2*x+3)-423/8750*14^(1/2)*arctan(1/28*(10*x+2)*14^(1/2))

________________________________________________________________________________________

Maxima [A]  time = 1.54292, size = 58, normalized size = 1.04 \begin{align*} \frac{4}{15} \, x^{3} - \frac{33}{50} \, x^{2} - \frac{423}{8750} \, \sqrt{14} \arctan \left (\frac{1}{14} \, \sqrt{14}{\left (5 \, x + 1\right )}\right ) + \frac{81}{125} \, x + \frac{229}{625} \, \log \left (5 \, x^{2} + 2 \, x + 3\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((4*x^4-5*x^3+3*x^2+x+2)/(5*x^2+2*x+3),x, algorithm="maxima")

[Out]

4/15*x^3 - 33/50*x^2 - 423/8750*sqrt(14)*arctan(1/14*sqrt(14)*(5*x + 1)) + 81/125*x + 229/625*log(5*x^2 + 2*x
+ 3)

________________________________________________________________________________________

Fricas [A]  time = 1.23313, size = 157, normalized size = 2.8 \begin{align*} \frac{4}{15} \, x^{3} - \frac{33}{50} \, x^{2} - \frac{423}{8750} \, \sqrt{14} \arctan \left (\frac{1}{14} \, \sqrt{14}{\left (5 \, x + 1\right )}\right ) + \frac{81}{125} \, x + \frac{229}{625} \, \log \left (5 \, x^{2} + 2 \, x + 3\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((4*x^4-5*x^3+3*x^2+x+2)/(5*x^2+2*x+3),x, algorithm="fricas")

[Out]

4/15*x^3 - 33/50*x^2 - 423/8750*sqrt(14)*arctan(1/14*sqrt(14)*(5*x + 1)) + 81/125*x + 229/625*log(5*x^2 + 2*x
+ 3)

________________________________________________________________________________________

Sympy [A]  time = 0.123366, size = 61, normalized size = 1.09 \begin{align*} \frac{4 x^{3}}{15} - \frac{33 x^{2}}{50} + \frac{81 x}{125} + \frac{229 \log{\left (x^{2} + \frac{2 x}{5} + \frac{3}{5} \right )}}{625} - \frac{423 \sqrt{14} \operatorname{atan}{\left (\frac{5 \sqrt{14} x}{14} + \frac{\sqrt{14}}{14} \right )}}{8750} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((4*x**4-5*x**3+3*x**2+x+2)/(5*x**2+2*x+3),x)

[Out]

4*x**3/15 - 33*x**2/50 + 81*x/125 + 229*log(x**2 + 2*x/5 + 3/5)/625 - 423*sqrt(14)*atan(5*sqrt(14)*x/14 + sqrt
(14)/14)/8750

________________________________________________________________________________________

Giac [A]  time = 1.17232, size = 58, normalized size = 1.04 \begin{align*} \frac{4}{15} \, x^{3} - \frac{33}{50} \, x^{2} - \frac{423}{8750} \, \sqrt{14} \arctan \left (\frac{1}{14} \, \sqrt{14}{\left (5 \, x + 1\right )}\right ) + \frac{81}{125} \, x + \frac{229}{625} \, \log \left (5 \, x^{2} + 2 \, x + 3\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((4*x^4-5*x^3+3*x^2+x+2)/(5*x^2+2*x+3),x, algorithm="giac")

[Out]

4/15*x^3 - 33/50*x^2 - 423/8750*sqrt(14)*arctan(1/14*sqrt(14)*(5*x + 1)) + 81/125*x + 229/625*log(5*x^2 + 2*x
+ 3)